package com.sinry.user.controller;

import com.sinry.api.client.feign.user.UserClient;
import com.sinry.common.core.annotations.ResponseHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author linxinlei
 * @project sinry-cloud
 * @description 用户访问
 * @date 2022/5/6
 **/
@Slf4j
@Api(tags = "用户信息")
@ResponseHandler
@RestController
@RequestMapping("/user")
public class UserController {

    private final UserClient userClient;

    public UserController(UserClient userClient) {
        this.userClient = userClient;
    }

    @ApiOperation(value = "获取用户信息")
    @GetMapping("/get")
    public void getUser() {
        log.info("获取用户信息: {}", userClient.getUser());
    }

}
